package net.topcrazy.base.common;

import java.io.Serializable;

public class PageObj
	implements Serializable
{

	private static final long serialVersionUID = 0xcf005a78fa304989L;
	private int pageIndex;
	private int pageCount;
	private int total;

	public PageObj()
	{
		pageCount = 0;
		pageIndex = 0;
		total = 0;
	}

	public PageObj(int pageIndex, int pageCount)
	{
		this.pageIndex = pageIndex;
		this.pageCount = pageCount;
		total = 0;
	}

	public int getPageIndex()
	{
		if (pageIndex <= 0)
			return 1;
		else
			return pageIndex;
	}

	public void setPageIndex(int pageIndex)
	{
		this.pageIndex = pageIndex;
	}

	public int getPageCount()
	{
		if (pageCount <= 0)
			return 1;
		else
			return pageCount;
	}

	public void setPageCount(int pageCount)
	{
		this.pageCount = pageCount;
	}

	public int getTotal()
	{
		return total;
	}

	public void setTotal(int total)
	{
		this.total = total;
	}
}
